package com.zrt.springboot.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("sys_river_sensor")
public class River {
    private int id;
    private String sensorId;
    private double depth;
    private String time;

    public River( String sensor_id, double depth, String time) {
        this.sensorId = sensor_id;
        this.depth = depth;
        this.time = time;
    }
    public String high(){
        return "id:"+ sensorId + " 深度:" + String.valueOf(depth) + " " + time + "时刻的值超过阈值";
    }

    public String low(){
        return "id:"+ sensorId + " 深度:" + String.valueOf(depth) + " " + time + "时刻的值低于阈值";
    }

}
